﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Agr.CQRS.Domain.Events;

namespace Agr.CQRS.Domain.Commands
{
    public abstract class Command
    {
        public Guid AffectedAggregateRootId { get; set; }
        public int AffectedVersion { get; set; }
        public int AffectedEntity { get; set; }

        public override string ToString()
        {
            return string.Format("{0}.{1}/{2}.{3}", GetType().Name, AffectedAggregateRootId, AffectedVersion, AffectedEntity);
        }
        public override int GetHashCode()
        {
            return ToString().GetHashCode();
        }
    }
}
